<?php
App::uses('Component', 'Controller');
class OrderDetailsComponent extends Component {
	var $components = array('Session');
	
	public function addUserDetails($user,$billingAddress ,$shippingAddress,$telephonenumber){
		$this->Session->write('details.User',$user);
		$this->Session->write('details.Billingaddress',$billingAddress);
		$this->Session->write('details.Shippingaddress',$shippingAddress);
		$this->Session->write('details.Phonenumber',$telephonenumber);
	}
	
	public function addOrderDetails($bookingStartDate, $bookingEndDate){
		$this->Session->write('details.Order.bookingstartdate',$bookingStartDate);
		$this->Session->write('details.Order.bookingenddate',$bookingEndDate);
	}
	
	public function getOrderDetails(){
		return $this->Session->read('details');
	}
	
	public function emptyAll()
	{
		$this->Session->delete('details');
	}
}
?>